<?php echo $this->Form->create('Task',array('action'=>'search'));?>
<div class="list_header">
	<div class="pages" style="padding-left: 20px; float:left !important;">
		<?php echo $this->Html->link($html->image('go-back.png',array('width'=>'20px','heigth'=>'20px')),array('action' => 'index'),array('escape' => false));?><h2><?php echo $selectedTask['Task']['taskName'];?></h2>
	</div>
	<div id="container" class="clearfix">
	<table border="0" cellpadding="5" cellspacing="1" width="100%">
		<tr class="title">
			<td>Id</td>
			<td>Item name</td>
			<td>Description</td>
			<td>Type</td>
			<td>Estimated Hour</td>
			<td>Real Hour</td>
			<td colspan="8"><span><?php __('Actions');?></span></td>
		</tr>
		<?php foreach ($listItems as $item): ?>
		<tr>
			<td><?php echo $item['TaskItem']['id']; ?>&nbsp;</td>
			<td><?php echo $item['TaskItem']['name']; ?>&nbsp;</td>
			<td><?php echo $item['TaskItem']['description']; ?>&nbsp;</td>
			<td><?php echo $item['TypeItem']['name']; ?>&nbsp;</td>
			<td><?php echo $item['TaskItem']['estimatedHour']; ?>&nbsp;</td>
			<td><?php echo $item['TaskItem']['realHour']; ?>&nbsp;</td>
			<td class="actions">
				<?php echo $this->Html->link($html->image('icon/edit.png'), array('controller' => 'tasks', 'action' => 'editItem', $item['TaskItem']['id']),array('escape' => false)); ?>
				<?php echo $this->Html->link($html->image('icon/delete.png'), array('action' => 'deleteItem', $item['TaskItem']['id']),array('escape' => false), null, sprintf(__('Are you sure you want to delete %s?', true), $item['TaskItem']['name'])); ?>
			</td>
		</tr>
		<?php endforeach;?>
	</table>
</div>